<?php
include("common.inc.php");
include(INC_PATH."/order.class.php");

InitGP(array("page","action","bid","oid","delids","verify","gid","order_sn","order_addtime")); //初始化变量全局返回
$o=new OrderClass();

//if(empty($action) && $verify == "cd714169cdb04e85eccec6502e653769"){
if(empty($action)){	
	if(!empty($gid))$wherestr[]="gid='{$gid}'";
	if(!empty($order_sn))$wherestr[]="order_sn like '%{$order_sn}%'";
//	if(!empty($order_addtime)){
//		$wherestr[]="order_addtime={$order_addtime}";
//		
//	}
	$wherestr[]="referer Like 'www.mycoupon.com.tw%'"; //設定導入來源
	if(!empty($wherestr)) $wheresql = implode(' AND ', $wherestr);	//条件汇总
	
	//获取当前页码
	$total=$o->getcount($wheresql); 							  //总信息数
	$pagesize=15;												  //一页显示信息数
	$page = isset($page) ? max(1, intval($page)) : 1;             //处理页码变量
	$offset=($page-1)*$pagesize;   								  //偏移量
	$dataarray=$o->getdata("$offset,$pagesize",$wheresql,"oid DESC"); //获取团购数据
	
}

include template('mycoupon_sell_list');//包含輸出指定模板
?>